package com.muki.wareHouse;

import java.nio.file.Path;

public class LocalCorpusHouse extends CorpusHouse {

	private String root;
	private RouteMap map;


	public LocalCorpusHouse(String root,RouteMap map) {
		this.root = root;
		this.map = map;
	}

	@Override
	public int inHouse(ListCorpus list) {
		synchronized (list) {
			int count = 0;
			while(list.peek()!=null) {
				CorpusParser cp = list.poll();
				Path path = cp.localSave(root);
				if(path!=null) {
					count++;
				}
			}
			return count;
		}
	}

}
